package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-09-09  17:17
 * @Description:关于预约的底部的时间段的实体
 */
public class BookingInsideBean implements Parcelable {

    //开始工作的时段
    private String rentBeginTime;
    //结束工作的时段，这一个时段 不可预约
    private String rentEndTime;

    //这个预约的时间段id
    private int siteTimeSpanId;
    //时间的长度
    private int timeLength;
    //汉字信息
    private String timeSpanLabel;
    //这个时间段 是否可用
    private boolean usable;
    private boolean isChecked;


    public String getRentBeginTime() {
        return rentBeginTime;
    }

    public void setRentBeginTime(String rentBeginTime) {
        this.rentBeginTime = rentBeginTime;
    }

    public String getRentEndTime() {
        return rentEndTime;
    }

    public void setRentEndTime(String rentEndTime) {
        this.rentEndTime = rentEndTime;
    }

    public int getSiteTimeSpanId() {
        return siteTimeSpanId;
    }

    public void setSiteTimeSpanId(int siteTimeSpanId) {
        this.siteTimeSpanId = siteTimeSpanId;
    }

    public int getTimeLength() {
        return timeLength;
    }

    public void setTimeLength(int timeLength) {
        this.timeLength = timeLength;
    }

    public String getTimeSpanLabel() {
        return timeSpanLabel;
    }

    public void setTimeSpanLabel(String timeSpanLabel) {
        this.timeSpanLabel = timeSpanLabel;
    }

    public boolean isUsable() {
        return usable;
    }

    public void setUsable(boolean usable) {
        this.usable = usable;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.rentBeginTime);
        dest.writeString(this.rentEndTime);
        dest.writeInt(this.siteTimeSpanId);
        dest.writeInt(this.timeLength);
        dest.writeString(this.timeSpanLabel);
        dest.writeByte(this.usable ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isChecked ? (byte) 1 : (byte) 0);
    }

    public void readFromParcel(Parcel source) {
        this.rentBeginTime = source.readString();
        this.rentEndTime = source.readString();
        this.siteTimeSpanId = source.readInt();
        this.timeLength = source.readInt();
        this.timeSpanLabel = source.readString();
        this.usable = source.readByte() != 0;
        this.isChecked = source.readByte() != 0;
    }

    public BookingInsideBean() {
    }

    protected BookingInsideBean(Parcel in) {
        this.rentBeginTime = in.readString();
        this.rentEndTime = in.readString();
        this.siteTimeSpanId = in.readInt();
        this.timeLength = in.readInt();
        this.timeSpanLabel = in.readString();
        this.usable = in.readByte() != 0;
        this.isChecked = in.readByte() != 0;
    }

    public static final Parcelable.Creator<BookingInsideBean> CREATOR = new Parcelable.Creator<BookingInsideBean>() {
        @Override
        public BookingInsideBean createFromParcel(Parcel source) {
            return new BookingInsideBean(source);
        }

        @Override
        public BookingInsideBean[] newArray(int size) {
            return new BookingInsideBean[size];
        }
    };
}
